package com.finance.service.impl;

import com.finance.domain.Money;
import com.finance.service.IMoneyService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 存取款Service业务层处理
 *
 * @author my
 * @date 2022-06-07
 */
@Service("moneyService")
public class MoneyServiceImpl extends BaseServiceImpl implements IMoneyService {

    /**
     * 查询存取款
     *
     * @param id 存取款ID
     * @return 存取款
     */
    @Override
    public Money selectMoneyById(Integer id) {
        return moneyMapper.selectMoneyById(id);
    }

    /**
     * 查询存取款列表
     *
     * @param money 存取款
     * @return 存取款
     */
    @Override
    public List<Money> selectMoneyList(Money money) {
        return moneyMapper.selectMoneyList(money);
    }

    /**
     * 新增存取款
     *
     * @param money 存取款
     * @return 结果
     */
    @Override
    public int insertMoney(Money money) {


        return moneyMapper.insertMoney(money);
    }

    /**
     * 修改存取款
     *
     * @param money 存取款
     * @return 结果
     */
    @Override
    public int updateMoney(Money money) {
        return moneyMapper.updateMoney(money);
    }


    /**
     * 删除存取款信息
     *
     * @param id 存取款ID
     * @return 结果
     */
    @Override
    public int deleteMoneyById(Integer id) {
        return moneyMapper.deleteMoneyById(id);
    }

    @Override
    public List<Integer> selectSevenDaysPv(String userId) {
        return moneyMapper.selectSevenDaysPv(userId);
    }

    @Override
    public List<Integer> selectSevenDaysUv(String userId) {
        return moneyMapper.selectSevenDaysUv(userId);
    }
}
